<?php

namespace fanletter\model\element;

/**
 * 
 * defines an abstract Element model
 * 
 * @author Evan
 *
 */
abstract class Element
{
	
	private $id;
	private $content;
	private $order;
	private $contentId;
	
	public function __construct($id = 0, $content = '', $order = 0, $contentId = 0)
	{
		$this->id = intval($id);
		$this->content = (String)$content;
		$this->order = intval($order);
		$this->contentId = intval($contentId);
	}

	public static abstract function getType();
	
	public static abstract function getDefaultTemplateFileName();
	
	/*
	 * Getter und Setter
	 */
	
	public function getId()
	{
		return $this->id;
	}
	
	public function getContent()
	{
		return $this->content;
	}
	
	public function getOrder()
	{
		return $this->order;
	}
	
	public function getContentId()
	{
		return $this->contentId;
	}
	
	/**
	 * Returns an array with all the arguments
	 * 
	 * @return Array
	 */
	public function getBuilderArguments()
	{
		$arguments['ELEMENT_CONTENT'] = $this->content;
		return $arguments;
	}
	
	public function setId($id)
	{
		$this->id = intval($id);
	}
	
	public function setContent($content)
	{
		$this->content = (String)$content;
	}
	
	public function setOrder($order)
	{
		$this->order = intval($order);
	}
	
	public function setContentId($contentId)
	{
		$this->contentId = intval($contentId);
	}
	
}
